<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="" content="">
  <title></title>
  <style></style>
</head>

<body>
  <p>ok</p>
  <p>aaaaaa</p>
  <p>bbbbbb</p>
  <p>cccccc</p>

 <script>
   
   class jQuery{

    constructor(a){
      const aa = document.querySelectorAll(a)
      const length  = aa.length
      for(let i = 0; i < length; i++){
        this[i] = aa[i]
      }
      this.length = length
      this.a = a
    }


    get(index){return this[index]}

    each(fu){
      for(let i = 0; i < this.length; i++){
        const b = this[i]
        fu(b)
      }
    }

    on(type, fu){
      return this.each(function(b){
        b.addEventListener(type, fu, false)
      })
    }
   }
    
 </script>
</body>

</html>